package com.marver.common.exception;

import com.marver.common.result.ResultStatus;

/**
 * @description: 自定义异常
 * @Author: Marver
 * @date: 2018-04-27 15:23
 **/
public class HmException extends RuntimeException {

    private String msg;
    private int code = ResultStatus.INVALID_PARAM.getErrorCode();

    public HmException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public HmException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public HmException(String msg, int code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public HmException(String msg, int code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
